package com.aaa.a1104.demo01;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * @author 荆豪峰
 * @version 1.0
 */
public class Test01 {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        list.add(99);
        list.add(56);
        list.add(96);
        list.add(38);
       // Comparator<Integer> comparator=(o1, o2) ->Integer.compare(o1,o2);
        Comparator<Integer> comparator=Integer::compare;
        Collections.sort(list, comparator);
        System.out.println(list);
    }
}
